package com.fjzx.androidframe.ui.chip;

import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;

import com.tylersuehr.chips.Chip;

/**
 * ChipsInputLayout 控件数据实体类
 *
 * @author xiongyongcong
 */
public class XChip extends Chip {
    private String id;
    private String title;
    private Uri avatar;
    private Drawable avatarDrawable;

    public XChip(String id, String title) {
        this.id = id;
        this.title = title;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Uri getAvatar() {
        return avatar;
    }

    public void setAvatar(Uri avatar) {
        this.avatar = avatar;
    }

    public void setAvatarDrawable(Drawable avatarDrawable) {
        this.avatarDrawable = avatarDrawable;
    }

    @Nullable
    @Override
    public Object getId() {
        return id;
    }

    @NonNull
    @Override
    public String getTitle() {
        return title;
    }

    @Nullable
    @Override
    public String getSubtitle() {
        return null;
    }

    @Nullable
    @Override
    public Uri getAvatarUri() {
        return avatar;
    }

    @Nullable
    @Override
    public Drawable getAvatarDrawable() {
        return avatarDrawable;
    }
}
